<template>
  <web-view :src="url" :webview-styles="{ scalable: true, height: '100%', width: '100%' }" />
</template>

<script setup lang="ts">
  import { getEnvValue } from '@/utils/env';
  import { onLoad } from '@dcloudio/uni-app';
  import { ref } from 'vue';

  const VITE_PREVIEW_URL = getEnvValue<string>('VITE_PREVIEW_URL');

  const url = ref<string>('');

  onLoad((options: any) => {
    url.value = VITE_PREVIEW_URL + options.url;
  });
</script>

<style></style>
